package com.example.springbootServiceNetwork.demos.web.Entity;



import com.alibaba.fastjson2.JSONArray;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 *商品
 */
@Data
@TableName(value = "tab_goods",autoResultMap = true)
public class Goods implements Serializable {
    @TableId(value = "goods_id",type = IdType.AUTO)
    private String goodsId; // 商品id
    private String goodsName; // 商品名称
    private Double price; // 商品价格
    private String goodsCode; // 商品编码
    @TableField(typeHandler = FastjsonTypeHandler.class)
    private JSONArray imageList;//商品图片
    private String category; // 商品分类
    private Integer totalStock; // 总库存
    private Integer sold; // 已销售
    private String merchantId; // 商户id
    @TableField(typeHandler = FastjsonTypeHandler.class)
    private JSONArray discount; // 商品折扣
    private String description; // 商品描述
    @TableField(typeHandler = FastjsonTypeHandler.class)
    private JSONArray tags; // 商品标签
    private String status;//商品状态
    private String remark; // 备注
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;//创建时间

}

